fs/xfs: Fix grub_xfs_iterate_dir return value in case of failure
authorEgor Ignatov <egori@altlinux.org>
Thu, 23 Jan 2025 17:44:14 +0000 (20:44 +0300)
committerFelix Zielcke <fzielcke@z-51.de>
Thu, 3 Jul 2025 16:35:51 +0000 (18:35 +0200)
commit2850a3e9b7b9890f329414de3cb174ec348285e2
tree440814e3113e93cbf8fda683fe81ac6d6f16f8f0
parent65bd67c408094fb7b8746babf121c6455e95e0bf
fs/xfs: Fix grub_xfs_iterate_dir return value in case of failure

Commit ef7850c757 introduced multiple boundary checks in grub_xfs_iterate_dir()
but handled the error incorrectly returning error code instead of 0.

Also change the error message so that it doesn't match the message
in grub_xfs_read_inode().

Fixes: ef7850c757 (fs/xfs: Fix issues found while fuzzing the XFS filesystem)
Signed-off-by: Egor Ignatov <egori@altlinux.org>
Gbp-Pq: Topic cve-2025-jan
Gbp-Pq: Name fs-xfs-Fix-grub_xfs_iterate_dir-return-value-in-case-of-f.patch
grub-core/fs/xfs.c